package com.jsmtr.rms.service.impl;

import com.jsmtr.rms.dao.DaoService;
import com.jsmtr.rms.entity.UserAppend;
import com.jsmtr.rms.service.IDUserAppendService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * @author: cyx
 * @description:
 * @date: Created in 2020-2-26 14:51
 * @modified by:
 */
@Service
public class DUserAppendService implements IDUserAppendService {
    @Resource
    private DaoService dao;

    @Override
    public List<UserAppend> findUserAppendByCardNo(String cardno) throws Exception {
        return  dao.find("from UserAppend where cardno=?",new String[]{cardno});

    }

    @Override
    public UserAppend findUserAppendById(String id) throws Exception {
        return (UserAppend) dao.get(UserAppend.class,id);
    }

    @Override
    public List<UserAppend> findUserAppendByRid(String rid) throws Exception {
        return dao.find("from UserAppend where rid=?",new String[]{rid});
    }


}
